﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<brjostagjof.Models.Question>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Skrifa spurningu
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2 class="editHeader">Skrifa spurningu</h2>
    <p style=" color:Red">Fylla verður út í reiti merkta með * </p>
    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>

        <fieldset>
            
            <div class="editor-label">
                Spurning <span style="color:Red"> *</span>
            </div>
            <div class="editor-field">
                <input type="text" id="headline" name="headline" />
            </div>
            
            <div class="editor-label">
                Nánari útskýring <span style="color:Red"> *</span>
            </div>
            <div class="editor-field">
                <textarea id="context" name="context" rows="10" cols="30"></textarea>
            </div>
            
            <div class="editor-label">
                Flokkur
            </div>
            <div class="editor-field">
            <select id="category" name="category">
                <% var categories = brjostagjof.Controllers.HomeController.GetQuestionCategories();
                   foreach (var category in categories)
                   { %>
                    <option value="<%: category.ID %>"><%: category.name %></option>
                   <% } %>
            </select>
            </div>
            
            
            <p>
                <input type="submit" value="Staðfesta" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Hætta við", "SogS") %>
    </div>

</asp:Content>

